﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IronLua.Runtime
{
    public static class MetaMethodNames
    {
        private static readonly string[] Names = new string[] 
        {
            "__index", "__newindex",
            "__gc", "__mode", "__len", "__eq",
            "__add", "__sub", "__mul", "__div", "__mod",
            "__pow", "__unm", "__lt", "__le",
            "__concat", "__call"
        };

        public static string ToMetaMethodString(this MetaMethods meta)
        {
            var index = (int)meta;
            return MetaMethodNames.Names[index];
        }
    }
}
